<template>
  <div class="big">
    <div class="first"></div>
    <div class="top">
      <div class="top_box">
        <p class="p">易居房产</p>
        <h1 class="h1">侍美丽</h1>
        <span class="top_span">
          <img
            src="https://images.sqfcw.com/images/icon/agent/tel@2x.png"
            alt=""
            class="top_span_img"
          />
          <p class="top_span_img">13773992453</p>
        </span>
        <span class="top_span">
          <img
            src="https://images.sqfcw.com/images/icon/agent/address@2x.png"
            alt=""
            class="top_spans_img"
          />
          <p class="top_spans_p">长江路105号东50米</p>
        </span>
      </div>
      <img
        src="https://images.sqfcw.com/attachment/information/20201204/f56558c6a2de646c2ca757c90e408cc9d5f5cbf0.jpeg?x-oss-process=style/w_6401"
        alt=""
        class="top_img"
      />
    </div>

    <!-- <div class="kong"></div> -->
    <div class="main">
      <div class="salehouse">
        <h3
          @click="gotab(index)"
          :class="tabIndex === index ? 'active' : ''"
          v-for="(item, index) in data"
          :key="index"
        >
          {{ item }}
        </h3>

        <span>房源: 25</span>
      </div>
      <div class="house">
        <dl v-for="(item, index) in datalist" :key="index">
          <dt>
            <img :src="item.img" alt="" />
          </dt>
          <dd>
            <p class="dd-p">{{ item.name }}</p>
            <span class="dd-span">
              <p class="dd-p1">{{ item.title }}</p>
              <p class="dd-p2">{{ item.small }}</p>
            </span>
            <span class="dd-span1">
              <p class="dd-p3">{{ item.wantprice }}</p>
              <p class="dd-p4">{{ item.date }}</p>
            </span>
          </dd>
        </dl>
      </div>
    </div>
    <div class="fix" @click="goask">
      <img
        src="https://images.sqfcw.com/attachment/information/20201204/f56558c6a2de646c2ca757c90e408cc9d5f5cbf0.jpeg?x-oss-process=style/w_6401"
        alt=""
        class="fixed"
      />
      <span class="spans" @click="goasks">系统找房</span>
    </div>
    <div class="deep">
      <span class="iconfont icon-fenxiang"> <p>分享</p> </span>

      <button class="ask" @click="goask">在线咨询</button>
      <button class="phone" @click="gophone">电话咨询</button>
    </div>
  </div>
</template>

<script>
import { getBrokerList } from "../../service";
import "./brokerDetail.scss";
import "../../font/iconfont.css";

export default {
  data() {
    return {
      tabIndex: 0,
      data: ["卖房", "租房"],
      datalist: [
        {
          name: "兴鸿一品大2室送实用内置阁楼",
          title: "2室2厅1卫 | 96m",
          small: "兴鸿一品",
          wantprice: "110万 11458.33元/m",
          date: "2天前",
          img:
            "https://images.sqfcw.com/attachment/information/20210621/d873a26c2a50ac9a6573290e282d3279b8822f62.jpeg?x-oss-process=style/w_240",
        },
        {
          name: "帝景豪苑大2室送实用内置阁楼",
          title: "2室2厅1卫 | 96m",
          small: "帝景豪苑",
          wantprice: "195万 11458.33元/m",
          date: "2天前",
          img:
            "https://images.sqfcw.com/attachment/information/20210622/e7f4748789170dba5aaf7041693b9ad6f5ae0af4.jpeg?x-oss-process=style/w_240",
        },
        {
          name: "金銮殿大2室送实用内置阁楼",
          title: "2室2厅1卫 | 96m",
          small: "金銮殿",
          wantprice: "290万 11458.33元/m",
          date: "2天前",
          img:
            "https://images.sqfcw.com/attachment/information/20210618/382971f3a60289ce7ac115a4fcdab2d14ba45020.jpeg?x-oss-process=style/w_240",
        },
      ],
    };
  },
  methods: {
    gotab(index) {
      this.tabIndex = index;
    },
    gophone: function () {
      wx.redirectTo({
        //保留当前页面，跳转到应用内的某个页面（最多打开5个页面，之后按钮就没有响应的）
        url: "/pages/detail/phone",
      });
    },
    goask: function () {
      wx.navigateTo({
        //保留当前页面，跳转到应用内的某个页面（最多打开5个页面，之后按钮就没有响应的）
        url: "/pages/detail/asksmth",
      });
    },
    goasks: function () {
      wx.navigateTo({
        //保留当前页面，跳转到应用内的某个页面（最多打开5个页面，之后按钮就没有响应的）
        url: "/pages/detail/asksmth",
      });
    },
  },
  async onShow() {
    // let result=await getBrokerList()
    // console.log(result);
  },
};
</script>

<style lang="scss" scoped>
// @import url('../../font/iconfont.css');
</style>